A virtual machine is a software layer between an application and a platform that isolates the application from the platform on which it is running. A platform comprises computer hardware and the operating system that drives low level operations of the hardware such as memory and thread management. Operating systems are generally written and compiled to function only with a particular central processing unit (CPU). There are different types of virtual machines. One type of virtual machine allows a multi-platform software application to execute without being written and compiled for the specific platform on which it is running. Another type of virtual machines permits a program designed to operate on one platform to operate on a different platform by modeling the hardware operations in the software domain. In either case, software instructions of the application are converted into native instructions rather then being directly executed natively by the CPU. The conversion of software instructions into native instructions may be performed using an interpreter, a just-in-time (JIT) compiler, or a combination of an interpreter and JIT compiler.
In the realm of resource-constrained platforms, which includes battery operated devices such as wireless phones, pagers, personal digital assistants, camcorders, game devices, MP3 players, small retail payment terminals and smart cards, etc., virtual machines are commonly used to provide cross-platform operability to software applications. One example of such a virtual machine is the Java CVM, which is used to launch and execute Java applications written to the connected device configuration (CDC). A resource-constrained platform having a CVM installed can execute cross-platform Java code to impart desired functionality to the system. For example, a mobile phone having an implementation of CVM can run Java software to implement a game, a calendar, an alarm, or other desired function.
Computer systems implemented in mobile devices or other resource-constrained platforms are generally not well suited for software development. For example, it can be difficult if not impossible to connect a keyboard and full-size monitor to a resource-constrained platform such as a cell phone to write a software application, much less compile the application into byte code suitable for execution on the virtual machine. Because it is not practical to develop and debug software intended for execution on a resource-constrained platform on that same system, it would be desirable to configure a version of the CVM to operate on a desktop computer system. However, in this case, the input and output of the user-interface and other specialized hardware such as networking connectivity must be mapped from the resource-constrained platform to the desktop computer system. Since each resource-constrained platform type (e.g., a particular model of a mobile phone) is provided with a corresponding CVM that is specifically designed with hardware-specific application programming interfaces to operate a specific configuration, it is not practical to reconfigure each CVM with modified APIs that provide user-input and output mapped from the resources available in the resource-constrained platform to the desktop computer system.
Resource constrained platforms are known that are capable of executing a plurality of applications concurrently. There are various techniques for managing multiple applications in a single device. In one technique, an application management system starts, stops, and pauses multiple applications in cooperation with the applications themselves. The application can designate a single active application, which is an application that has control over the user interface, although multiple applications can be executing concurrently in the background. Previous emulation systems were inefficient in providing communication between an emulation program, which may be, for example, a Java SE application that translates user input and output into inputs and outputs available in a resource constrained device such as a mobile phone or PDA.
U.S. Pat. No. 7,080,387 issued on Jul. 18, 2006 (“the '387 patent”) presents a mechanism for placing a Java application in communication with a native application in a different process. Using this mechanism, a function in the native application can be called from the Java application operating in a virtual machine. Thus, the mechanism described the '387 patent can be used to allow a CVM operating a Java ME application intended for execution on a resource-constrained platform to function on a desktop computer system by allowing a separate application emulator program to access input and output of the Java ME application. Once the application emulator has access to the inputs and outputs of the Java ME application, it can map those inputs and outputs as desired to the actual interface and devices connected to the desktop computer system.
Unfortunately, the local TCP/IP connection implemented by the mechanism described in the '387 patent represents a bottle-neck that restricts data flow between the two virtual machines, thereby reducing performance of the system as a whole.